<div style="min-height: 300px; padding-bottom: 20px; width: 98%; float: left" class="portlet x12">
	<div class="portlet-header">
		<h4>Thêm link
		</h4>

	</div>	<!-- .portlet-header -->

	    <?php echo form_open('admin/links/do_add_link','enctype="multipart/form-data"');?>

		  <div style='position:relative;top:20px;margin-left:10px;'>
                <label for="fname"><b>Tên link : </b></label>
				<div style='position:relative;bottom:23px;left:70px;'><input type="text" name="ten_link" size="35"/></div>
		  </div>

          <div style='position:relative;top:20px;margin-left:10px;'>
                <label for="fname"><b>link : </b></label>
				<div style='position:relative;bottom:23px;left:70px;'><input type="text" name="link" size="35"/></div>
		  </div>


		  <div style='position:relative;top:20px;margin-left:10px;'>
                <label for="fname"><b>Loại liên kết : </b></label>
				<div style='position:relative;bottom:23px;left:70px;'>
					<select id="type" name="type" onchange="addImage(this.value);">
						<option value="">Lựa chọn</option>
						<option value="website">Website</option>
						<option value="facebook">Facebook</option>
						<option value="twitter">Twitter</option>
						<option value="flickr">Flickr</option>
					</select>
				</div>
		 	</div>

		 	<div style='position:relative;top:20px;margin-left:10px;display:none' id="link_image">
                <label for="fname"><b>Hình ảnh :</b></label>
				<div style='position:relative;bottom:23px;left:70px;'><input type="file" name="img" /></div>
		  	</div>
		  <div class="buttonrow" style='position:relative;top:20px;left:150px;'>
					 <button class="btn btn-orange">Save</button>
		  </div><!-- end .buttonrow -->
		</form>

</div>	<!-- .portlet x12 -->
<script type="text/javascript">
function addImage(value){
	if(value=='website'){
		document.getElementById("link_image").style.display="";
	}else{
		document.getElementById("link_image").style.display="none";
	}
}
</script>